package com.yisu.expressway.ewf.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

public class RefundRecord implements Serializable {
    private Long id;

    private Long orderId;

    private BigDecimal refundAmount;

    private Integer status;

    private String refundObjId;

    private String refundNo;

    private String reason;

    private Timestamp refundTime;

    private Timestamp createTime;

    private String createBy;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRefundObjId() {
        return refundObjId;
    }

    public void setRefundObjId(String refundObjId) {
        this.refundObjId = refundObjId;
    }

    public String getRefundNo() {
        return refundNo;
    }

    public void setRefundNo(String refundNo) {
        this.refundNo = refundNo;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Timestamp getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Timestamp refundTime) {
        this.refundTime = refundTime;
    }

    public enum StatusEnum {
        WAIT_REFUND(0,"等待退款"),//货到付款
        SUCCESS(1,"操作成功");
        public int code;
        public String name;
        StatusEnum(int code, String name) {
            this.code = code;
            this.name = name;
        }

        public static String getEnumNameByCode(int code) {
            for (StatusEnum item : StatusEnum.values()) {
                if (item.code == code)
                    return item.name;
            }
            return null;
        }
    }

}